package com.magold.logic.polygon;

import org.andengine.extension.physics.box2d.PhysicsFactory;

import com.badlogic.gdx.physics.box2d.BodyDef.BodyType;
import com.badlogic.gdx.physics.box2d.Contact;
import com.badlogic.gdx.physics.box2d.FixtureDef;
import com.magold.context.IContext;
import com.magold.logic.ISpriteLogic;

public class HarmfulPrimitive extends PrimitiveLogic {
	private static FixtureDef sFixtureDef = PhysicsFactory.createFixtureDef(20.0f, 0.0f, 1.0f);
	private static Constants sConstants;
	public static void customize(Constants pConstants) {
		sConstants = pConstants;
	}
	
	
	public HarmfulPrimitive(PrimitiveShape pShape, BodyType pType) {
		super(pShape, sConstants.mRegion.deepCopy(), pType);
	}

	@Override
	public void startCollide(ISpriteLogic pAnother, Contact pContact) {
		// XXX hurt magold, and other hurtable objects.
	}
	
	@Override
	protected IContext getContext() {
		return sConstants.mContext;
	}

	@Override
	protected FixtureDef getFixtureDef() {
		return sFixtureDef;
	}

}
